package com.becca.cake.core.sms.message;



import com.becca.cake.core.constant.CommonConstants;
import com.becca.cake.core.sms.SMSTemplate;

public class SmsUserCoupon extends SMSTemplate
{
	//手机号
	private String  userMobileNo;
	//优惠券张数
	private String couponNumber;
	//截止时间
	private String    userEndDate;   
	
	public SmsUserCoupon(String userMobileNo, String couponNumber,
			String userEndDate)
	{
		this.userMobileNo = userMobileNo;
		this.couponNumber = couponNumber;
		this.userEndDate = userEndDate;
		this.setSendUrl();
		this.setPhone();
        this.setMessage();
	}

	@Override
	public void setSendUrl()
	{
		this.sendUrl = CommonConstants.YUNPIAN_SEND_ONE;
	}

	@Override
	public void setMessage()
	{
		//短信内容(签名+内容)
        String userRegistMessage = CommonConstants.YUNPIAN_CAKE_MASS_SIGNATURE +
        							CommonConstants.YUNPIAN_USER_COUPON_MESSAGE;
        this.msgData = userRegistMessage.replace("#couponNumber#", couponNumber).replace(
            "#expirationTime#", userEndDate);
	}

	@Override
	public void setPhone()
	{
		this.phone = userMobileNo;
	}

}
